#include <header.h>
#include "Filter.h"
#include "RequestHeader.h"
#include "RequestParameter.h"
#include "CommandToken.h"
#include "Service.h"
#include "Global.h"


void requestShortCommand(int net_fd, unsigned short command, const char *parameter){
    switch (command){
        case LOGIN:
            userLoginService(net_fd);
            break;
        case REGISTER:
            userRegisterService(net_fd);
            break;
        case CD:
            break;
        case LS:
            break;
        case PWD:
            // ! 即使是pwd也需要与服务端交互，因为客户端需要存活，可以发送alive帧
            printf("%s\n", currentDirectory);
            break;
        case RM:
            break;
        case MKDIR:
            break;
    }    
}


void requestLongCommand(unsigned short command){
    switch (command){
        case PUT_FILE:
            /* 唤醒子线程 */
            userPutFileService();
            break;
        case GET_FILE:
            /* 唤醒子线程 */
            userGetFileService();
            break;
    }    
}